<template>
    <div>
        <div class="book_title">
            <h1 align="center">未完成补货任务</h1>
        </div>
        <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>系统中心</el-breadcrumb-item>
            <el-breadcrumb-item>未完成补货任务</el-breadcrumb-item>
        </el-breadcrumb>
        <hr>
        <br>
        <el-table
                :data="replenishmentTask"
                height="250"
                border
                style="width: 100%">
            <el-table-column prop="id" label="编号" width="130"></el-table-column>
            <el-table-column prop="bookName" label="图书名称" width="130"></el-table-column>
            <el-table-column prop="planReplenishmentNum" label="计划补货量" width="130"></el-table-column>
            <el-table-column prop="finishStatus" label="完成状态" width="130">
                <template slot-scope="scope">
                    <span v-if="scope.row.finishStatus==0">未完成</span>
                    <span v-if="scope.row.finishStatus==1">已完成</span>
                </template>
            </el-table-column>
            <el-table-column label="创建时间" width="130">
                <template slot-scope="scope">
                    {{scope.row.createTime | datefmt('yyyy/MM/dd')}}
                </template>
            </el-table-column>
            <el-table-column label="操作" width="130">
                <template slot-scope="scope">
                    <el-button @click="replenishment(scope.row.code,scope.row.bookDetailedCode)">
                        补货
                    </el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
export default {
    name: "getReplenishmentTaskByNoFinish",
    data(){
        return{
            replenishmentTask:[]
        }
    },
    methods:{
        getReplenishmentTaskByNoFinish:function () {
            this.$http.post('/getReplenishmentTaskByNoFinish').then((res)=>{
                this.replenishmentTask=res.data.result.tbReplenishmentTask;
            })
        },
        replenishment:function (code,bookDetailedCode) {
            this.$router.push({path:'/entryBookSingle/'+code+'/'+bookDetailedCode});
        }
    },
    mounted() {
        this.getReplenishmentTaskByNoFinish();
    }
}
</script>

<style scoped>

</style>
